package com.hmkj.core.mapper.operate;

import com.hmkj.common.baseMapper.GenericMapper;
import com.hmkj.core.po.operate.PointRule;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 用户积分奖励规则表相关Dao接口<br>
 *
 * @author eproo
 * @date   2017-11-24 03:03:26
 */
public interface PointRuleMapper extends GenericMapper< PointRule,Integer> {

    @Select("SELECT t.* FROM biz_point_rule t WHERE 1 = 1 ${whereSql} ${sortSql} LIMIT ${nowPage}, ${pageSize}")
    List<PointRule> findListBySqlJoin(Map<String, Object> params);

    @Select("SELECT count(1)  FROM biz_point_rule t WHERE 1=1 ${whereSql}")
    long countBySqlJoin(Map<String, Object> params);

//    @Select("SELECT count(1)  FROM biz_point_rule t WHERE 1=1 and t.id <> ${id} and (t.name = '${name}' or t.code = '${code}') and t.del_flag = ${delFlag}")
//    int checkRepeatSql(PointRule model);
}
